package com.xinqi.xinqidev.publisher.config;

import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.QueueBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author xin麒
 * @date 2023/11/29 17:04
 */
@Configuration
public class MqConfig {
    @Bean
    public Queue lazyQueue(){//you can test you lazy queue in your Test Units
        return QueueBuilder
                .durable("myLazy.queue")
                .lazy() // 开启Lazy模式
                .build();
    }
}
